/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.himilco.ocana.gui.supervisor;

import com.himilco.ocana.workflow.core.dao.entities.Ticket;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

/**
 *
 * @author oussema
 */
public class SupervisorModel implements Serializable {

    private boolean value2;
    private List<Ticket> ticketsConfirmed;
    private Ticket selectedTicket = new Ticket(); 
    private Ticket[] TicketsSelected;
    private String SupervisorChoice = "*";
    private List<Ticket> tickets = new ArrayList<Ticket>();

    public SupervisorModel() {
        ticketsConfirmed = new ArrayList<Ticket>();
    }

    public String getSupervisorChoice() {
        return SupervisorChoice;
    }

    public void setSupervisorChoice(String SupervisorChoice) {
        this.SupervisorChoice = SupervisorChoice;
    }

    public List<Ticket> getTickets() {
        return tickets;
    }

    public void setTickets(List<Ticket> tickets) {
        this.tickets = tickets;
    }

    public boolean isValue2() {
        System.out.println("buttom checked status: " + value2);
        return value2;
    }

    public void setValue2(boolean value2) {
        System.out.println("buttom checked status: " + value2);
        this.value2 = value2;
    }

    public void addMessage() {
        String summary = value2 ? "Checked" : "Unchecked";
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(summary));
    }

    public Ticket[] getTicketsSelected() {
        return TicketsSelected;
    }

    public void setTicketsSelected(Ticket[] TicketsSelected) {
        this.TicketsSelected = TicketsSelected;
    }

    public Ticket getSelectedTicket() {
        return selectedTicket;
    }

    public void setSelectedTicket(Ticket selectedTicket) {
        this.selectedTicket = selectedTicket;
    }

    public List<Ticket> getTicketsConfirmed() {
        return ticketsConfirmed;
    }

    public void setTicketsConfirmed(List<Ticket> ticketsConfirmed) {
        this.ticketsConfirmed = ticketsConfirmed;
    }
}
